package com.chinawang;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Eureka客户端例子
 */
@Configuration
@ComponentScan("com.chinawang.controller")
@EnableAutoConfiguration
//@EnableDiscoveryClient//或者使用@EnableEurekaClient自动声明客户端
@EnableEurekaClient
public class EurekaClientApplication {



    public static void main(String[] args) {
        SpringApplication.run(EurekaClientApplication.class, args);
    }
}
